Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!(base): reintroduce Room::display_name #4470

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Jan 7, 2025

compute_display_name is made private again, and used only within the base crate. A new public counterpart Room::display_name is introduced, which returns a cached value for, or computes (and fills in cache) the display name. This is simpler to use, and likely what most users expect anyways.

Fixes #4469.

`compute_display_name` is made private again, and used only within the
base crate. A new public counterpart `Room::display_name` is introduced,
which returns a cached value for, or computes (and fills in cache) the
display name. This is simpler to use, and likely what most users expect
anyways.
@bnjbvr bnjbvr requested a review from a team as a code owner January 7, 2025 13:48
@bnjbvr bnjbvr requested review from poljar and removed request for a team January 7, 2025 13:48
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.09%. Comparing base (5110aa6) to head (59cebee).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk-base/src/rooms/normal.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4470      +/-   ##
==========================================
- Coverage   85.09%   85.09%   -0.01%     
==========================================
  Files         283      283              
  Lines       31771    31775       +4     
==========================================
+ Hits        27035    27038       +3     
- Misses       4736     4737       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, you even opened an issue for maxing out the github points 💪

@bnjbvr bnjbvr merged commit 618e472 into main Jan 7, 2025
40 checks passed
@bnjbvr bnjbvr deleted the bnjbvr/display-name branch January 7, 2025 14:25
@bnjbvr
Copy link
Member Author

bnjbvr commented Jan 7, 2025

Yeah, I was in the mood for postponing, to be honest, but then realized it was a pretty simple change…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rationalize compute_display_name() and cached_display_name()
2 participants